# coding:utf-8

DATA_FEED_LOCAL_DIR = "./base_datas"
DATA_FEED_LOCAL_CONFIG = "./base_datas/local_data_config.xml"
DATA_FEED_LOCAL_TMP_DIR = "./tmp_datas"

DATA_FEED_LIST_URL = "https://assoc-datafeeds-cn.amazon.com/datafeed/listFeeds?format=text/html"
DATA_FEED_ROOT_URL = "https://assoc-datafeeds-cn.amazon.com/datafeed/"
DATA_FEED_USERNAME = "zanlame-23"
DATA_FEED_PASSWORD = "zanlame-23"

LOG_ROOT_DIR = "./log"

MYSQL_HOST = "127.0.0.1"
MYSQL_PORT = 3306
MYSQL_USER = "root"
MYSQL_PASSWORD = "henhao"
CNBOOKS_DB = "data_warehouse_product_meta"

XML_EXCLUDE_TAGS = set(['item_promotions',
                        'amzn_promotions',
                        'fm_promotions',
                        'tp_new_promotions',
                        'wxjz'])

# item_delta_status为DELETE的数据,置空的数据字段
ITEM_DELTA_CLEAR_TAGS = ("item_page_url",
                    "amzn_page_url",
                    "buybox_page_url",
                    "fm_page_url",
                    "offer_page_url")

## FINAL VALUES below, do not modify them !!!!
CHILDREN_BOOK_PREFIX = "cn_amazon_chinesebook"
IMPORTED_BOOK_PREFIX = "cn_amazon_importedbook"
AMAZON_BOOKS_NAME_PREFIX = (CHILDREN_BOOK_PREFIX, IMPORTED_BOOK_PREFIX)

class BookConfig(object):
    CNBOOKS_CHILDREN_TYPE = "children_books"
    CNBOOKS_IMPORTED_TYPE = "imported_books"

    CNBOOKS_CHILDREN_TABLE = "amazon_cn_children_books"
    CNBOOKS_IMPORTED_TABLE = "amazon_cn_imported_books"
